@extends('home.cloud.base')
@section('con')
<style type="text/css">
.brick-item{
	position:relative;
	z-index:1;
	float:left;
	width:220px;
	margin-left:14px;
	margin-bottom:14px;
	-webkit-transition:all .2s linear;
	transition:all .2s linear
}	
</style>
	<form action="" method="post" name="myform">
		<input type="hidden" name="_token" value="{{ csrf_token() }}">
		<input type="hidden" name="_method" value="DELETE">
	</form>
	<h4><a href="{{ url('/home/photo/create') }}" style="color:pink">添加相册</a></h4>
	<ul>
		@foreach($list as $v)
		<li  class="brick-item" style="list-style:none">
			<span style="color:#FF6700">{{ $v->pname }}</span>　
			<div style="width:10%">
				<img src="{{ url('cloud') }}/{{ $v->photo }}" width="200px" height="150px">
				<div style="width:200px">
					<a href="javascript:doDel({{ $v->cloudid }})" style="color:red">删除</a>
					<span>&nbsp;　&nbsp;　&nbsp;　&nbsp;　&nbsp;　&nbsp;　</span>
				 	<a href="/home/photo/{{ $v->cloudid }}/edit" style="color:red">修改名称</a>
				</div>
			</div>
		</li>
		@endforeach
	</ul>
	<script type="text/javascript">
		function doDel(id)
		{
			if(confirm('确定要删除吗???')){
				var form = document.myform;
				form.action = '/home/photo/'+id;
				form.submit();
			}
		}
	</script>
@stop
